{"ast":null,"code":"import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nexport function toArray(value) {\n  if (Array.isArray(value)) {\n    return value;\n  }\n  return value !== undefined ? [value] : [];\n}\nexport var isClient = typeof window !== 'undefined' && window.document && window.document.documentElement;\n/** Is client side and not jsdom */\n\nexport var isBrowserClient = process.env.NODE_ENV !== 'test' && isClient;\nexport function hasValue(value) {\n  return value !== undefined && value !== null;\n}\nfunction isTitleType(title) {\n  return ['string', 'number'].includes(_typeof(title));\n}\nexport function getTitle(item) {\n  var title = undefined;\n  if (item) {\n    if (isTitleType(item.title)) {\n      title = item.title.toString();\n    } else if (isTitleType(item.label)) {\n      title = item.label.toString();\n    }\n  }\n  return title;\n}","map":{"version":3,"names":["_typeof","toArray","value","Array","isArray","undefined","isClient","window","document","documentElement","isBrowserClient","process","env","NODE_ENV","hasValue","isTitleType","title","includes","getTitle","item","toString","label"],"sources":["/data/messenger.client/node_modules/rc-select/es/utils/commonUtil.js"],"sourcesContent":["import _typeof from \"@babel/runtime/helpers/esm/typeof\";\nexport function toArray(value) {\n  if (Array.isArray(value)) {\n    return value;\n  }\n\n  return value !== undefined ? [value] : [];\n}\nexport var isClient = typeof window !== 'undefined' && window.document && window.document.documentElement;\n/** Is client side and not jsdom */\n\nexport var isBrowserClient = process.env.NODE_ENV !== 'test' && isClient;\nexport function hasValue(value) {\n  return value !== undefined && value !== null;\n}\n\nfunction isTitleType(title) {\n  return ['string', 'number'].includes(_typeof(title));\n}\n\nexport function getTitle(item) {\n  var title = undefined;\n\n  if (item) {\n    if (isTitleType(item.title)) {\n      title = item.title.toString();\n    } else if (isTitleType(item.label)) {\n      title = item.label.toString();\n    }\n  }\n\n  return title;\n}"],"mappings":"AAAA,OAAOA,OAAO,MAAM,mCAAmC;AACvD,OAAO,SAASC,OAAO,CAACC,KAAK,EAAE;EAC7B,IAAIC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE;IACxB,OAAOA,KAAK;EACd;EAEA,OAAOA,KAAK,KAAKG,SAAS,GAAG,CAACH,KAAK,CAAC,GAAG,EAAE;AAC3C;AACA,OAAO,IAAII,QAAQ,GAAG,OAAOC,MAAM,KAAK,WAAW,IAAIA,MAAM,CAACC,QAAQ,IAAID,MAAM,CAACC,QAAQ,CAACC,eAAe;AACzG;;AAEA,OAAO,IAAIC,eAAe,GAAGC,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,MAAM,IAAIP,QAAQ;AACxE,OAAO,SAASQ,QAAQ,CAACZ,KAAK,EAAE;EAC9B,OAAOA,KAAK,KAAKG,SAAS,IAAIH,KAAK,KAAK,IAAI;AAC9C;AAEA,SAASa,WAAW,CAACC,KAAK,EAAE;EAC1B,OAAO,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAACC,QAAQ,CAACjB,OAAO,CAACgB,KAAK,CAAC,CAAC;AACtD;AAEA,OAAO,SAASE,QAAQ,CAACC,IAAI,EAAE;EAC7B,IAAIH,KAAK,GAAGX,SAAS;EAErB,IAAIc,IAAI,EAAE;IACR,IAAIJ,WAAW,CAACI,IAAI,CAACH,KAAK,CAAC,EAAE;MAC3BA,KAAK,GAAGG,IAAI,CAACH,KAAK,CAACI,QAAQ,EAAE;IAC/B,CAAC,MAAM,IAAIL,WAAW,CAACI,IAAI,CAACE,KAAK,CAAC,EAAE;MAClCL,KAAK,GAAGG,IAAI,CAACE,KAAK,CAACD,QAAQ,EAAE;IAC/B;EACF;EAEA,OAAOJ,KAAK;AACd"},"metadata":{},"sourceType":"module"}